home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / layout / nsITreeView.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  26KB  |  584 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsITreeView.idl
  3.  */
  4.  
  5. #ifndef __gen_nsITreeView_h__
  6. #define __gen_nsITreeView_h__
  7.  
  8.  
  9. #ifndef __gen_nsITreeBoxObject_h__
  10. #include "nsITreeBoxObject.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsISupportsArray_h__
  14. #include "nsISupportsArray.h"
  15. #endif
  16.  
  17. #ifndef __gen_domstubs_h__
  18. #include "domstubs.h"
  19. #endif
  20.  
  21. /* For IDL files that don't want to include root IDL files. */
  22. #ifndef NS_NO_VTABLE
  23. #define NS_NO_VTABLE
  24. #endif
  25. class nsITreeSelection; /* forward declaration */
  26.  
  27. class nsITreeColumn; /* forward declaration */
  28.  
  29.  
  30. /* starting interface:    nsITreeView */
  31. #define NS_ITREEVIEW_IID_STR "22f034b7-a879-43ad-baee-ba6fd4d466ce"
  32.  
  33. #define NS_ITREEVIEW_IID \
  34.   {0x22f034b7, 0xa879, 0x43ad, \
  35.     { 0xba, 0xee, 0xba, 0x6f, 0xd4, 0xd4, 0x66, 0xce }}
  36.  
  37. class NS_NO_VTABLE nsITreeView : public nsISupports {
  38.  public: 
  39.  
  40.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITREEVIEW_IID)
  41.  
  42.   /**
  43.    * The total number of rows in the tree (including the offscreen rows).
  44.    */
  45.   /* readonly attribute long rowCount; */
  46.   NS_IMETHOD GetRowCount(PRInt32 *aRowCount) = 0;
  47.  
  48.   /**
  49.    * The selection for this view.
  50.    */
  51.   /* attribute nsITreeSelection selection; */
  52.   NS_IMETHOD GetSelection(nsITreeSelection * *aSelection) = 0;
  53.   NS_IMETHOD SetSelection(nsITreeSelection * aSelection) = 0;
  54.  
  55.   /** 
  56.    * An atomized list of properties for a given row.  Each property, x, that
  57.    * the view gives back will cause the pseudoclass :moz-tree-row-x
  58.    * to be matched on the pseudoelement ::moz-tree-row.
  59.    */
  60.   /* void getRowProperties (in long index, in nsISupportsArray properties); */
  61.   NS_IMETHOD GetRowProperties(PRInt32 index, nsISupportsArray *properties) = 0;
  62.  
  63.   /**
  64.    * An atomized list of properties for a given cell.  Each property, x, that
  65.    * the view gives back will cause the pseudoclass :moz-tree-cell-x
  66.    * to be matched on the ::moz-tree-cell pseudoelement.
  67.    */
  68.   /* void getCellProperties (in long row, in nsITreeColumn col, in nsISupportsArray properties); */
  69.   NS_IMETHOD GetCellProperties(PRInt32 row, nsITreeColumn *col, nsISupportsArray *properties) = 0;
  70.  
  71.   /**
  72.    * Called to get properties to paint a column background.  For shading the sort
  73.    * column, etc.
  74.    */
  75.   /* void getColumnProperties (in nsITreeColumn col, in nsISupportsArray properties); */
  76.   NS_IMETHOD GetColumnProperties(nsITreeColumn *col, nsISupportsArray *properties) = 0;
  77.  
  78.   /**
  79.    * Methods that can be used to test whether or not a twisty should be drawn,
  80.    * and if so, whether an open or closed twisty should be used.
  81.    */
  82.   /* boolean isContainer (in long index); */
  83.   NS_IMETHOD IsContainer(PRInt32 index, PRBool *_retval) = 0;
  84.  
  85.   /* boolean isContainerOpen (in long index); */
  86.   NS_IMETHOD IsContainerOpen(PRInt32 index, PRBool *_retval) = 0;
  87.  
  88.   /* boolean isContainerEmpty (in long index); */
  89.   NS_IMETHOD IsContainerEmpty(PRInt32 index, PRBool *_retval) = 0;
  90.  
  91.   /**
  92.    * isSeparator is used to determine if the row at index is a separator.
  93.    * A value of true will result in the tree drawing a horizontal separator.
  94.    * The tree uses the ::moz-tree-separator pseudoclass to draw the separator.
  95.    */
  96.   /* boolean isSeparator (in long index); */
  97.   NS_IMETHOD IsSeparator(PRInt32 index, PRBool *_retval) = 0;
  98.  
  99.   /**
  100.    * Specifies if there is currently a sort on any column. Used mostly by dragdrop
  101.    * to affect drop feedback.
  102.    */
  103.   /* boolean isSorted (); */
  104.   NS_IMETHOD IsSorted(PRBool *_retval) = 0;
  105.  
  106.   enum { DROP_BEFORE = -1 };
  107.  
  108.   enum { DROP_ON = 0 };
  109.  
  110.   enum { DROP_AFTER = 1 };
  111.  
  112.   /**
  113.    * Methods used by the drag feedback code to determine if a drag is allowable at
  114.    * the current location. To get the behavior where drops are only allowed on
  115.    * items, such as the mailNews folder pane, always return false when
  116.    * the orientation is not DROP_ON.
  117.    */
  118.   /* boolean canDrop (in long index, in long orientation); */
  119.   NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval) = 0;
  120.  
  121.   /**
  122.    * Called when the user drops something on this view. The |orientation| param
  123.    * specifies before/on/after the given |row|.
  124.    */
  125.   /* void drop (in long row, in long orientation); */
  126.   NS_IMETHOD Drop(PRInt32 row, PRInt32 orientation) = 0;
  127.  
  128.   /**
  129.    * Methods used by the tree to draw thread lines in the tree.
  130.    * getParentIndex is used to obtain the index of a parent row.
  131.    * If there is no parent row, getParentIndex returns -1.
  132.    */
  133.   /* long getParentIndex (in long rowIndex); */
  134.   NS_IMETHOD GetParentIndex(PRInt32 rowIndex, PRInt32 *_retval) = 0;
  135.  
  136.   /**
  137.    * hasNextSibling is used to determine if the row at rowIndex has a nextSibling
  138.    * that occurs *after* the index specified by afterIndex.  Code that is forced
  139.    * to march down the view looking at levels can optimize the march by starting
  140.    * at afterIndex+1.
  141.    */
  142.   /* boolean hasNextSibling (in long rowIndex, in long afterIndex); */
  143.   NS_IMETHOD HasNextSibling(PRInt32 rowIndex, PRInt32 afterIndex, PRBool *_retval) = 0;
  144.  
  145.   /**
  146.    * The level is an integer value that represents
  147.    * the level of indentation.  It is multiplied by the width specified in the 
  148.    * :moz-tree-indentation pseudoelement to compute the exact indendation.
  149.    */
  150.   /* long getLevel (in long index); */
  151.   NS_IMETHOD GetLevel(PRInt32 index, PRInt32 *_retval) = 0;
  152.  
  153.   /**
  154.    * The image path for a given cell. For defining an icon for a cell.
  155.    * If the empty string is returned, the :moz-tree-image pseudoelement
  156.    * will be used.
  157.    */
  158.   /* AString getImageSrc (in long row, in nsITreeColumn col); */
  159.   NS_IMETHOD GetImageSrc(PRInt32 row, nsITreeColumn *col, nsAString & _retval) = 0;
  160.  
  161.   /**
  162.    * The progress mode for a given cell. This method is only called for
  163.    * columns of type |progressmeter|.
  164.    */
  165.   enum { PROGRESS_NORMAL = 1 };
  166.  
  167.   enum { PROGRESS_UNDETERMINED = 2 };
  168.  
  169.   enum { PROGRESS_NONE = 3 };
  170.  
  171.   /* long getProgressMode (in long row, in nsITreeColumn col); */
  172.   NS_IMETHOD GetProgressMode(PRInt32 row, nsITreeColumn *col, PRInt32 *_retval) = 0;
  173.  
  174.   /**
  175.    * The value for a given cell. This method is only called for columns
  176.    * of type other than |text|.
  177.    */
  178.   /* AString getCellValue (in long row, in nsITreeColumn col); */
  179.   NS_IMETHOD GetCellValue(PRInt32 row, nsITreeColumn *col, nsAString & _retval) = 0;
  180.  
  181.   /**
  182.    * The text for a given cell.  If a column consists only of an image, then
  183.    * the empty string is returned.  
  184.    */
  185.   /* AString getCellText (in long row, in nsITreeColumn col); */
  186.   NS_IMETHOD GetCellText(PRInt32 row, nsITreeColumn *col, nsAString & _retval) = 0;
  187.  
  188.   /**
  189.    * Called during initialization to link the view to the front end box object.
  190.    */
  191.   /* void setTree (in nsITreeBoxObject tree); */
  192.   NS_IMETHOD SetTree(nsITreeBoxObject *tree) = 0;
  193.  
  194.   /**
  195.    * Called on the view when an item is opened or closed.
  196.    */
  197.   /* void toggleOpenState (in long index); */
  198.   NS_IMETHOD ToggleOpenState(PRInt32 index) = 0;
  199.  
  200.   /**
  201.    * Called on the view when a header is clicked.
  202.    */
  203.   /* void cycleHeader (in nsITreeColumn col); */
  204.   NS_IMETHOD CycleHeader(nsITreeColumn *col) = 0;
  205.  
  206.   /**
  207.    * Should be called from a XUL onselect handler whenever the selection changes.
  208.    */
  209.   /* void selectionChanged (); */
  210.   NS_IMETHOD SelectionChanged(void) = 0;
  211.  
  212.   /**
  213.    * Called on the view when a cell in a non-selectable cycling column (e.g., unread/flag/etc.) is clicked.
  214.    */
  215.   /* void cycleCell (in long row, in nsITreeColumn col); */
  216.   NS_IMETHOD CycleCell(PRInt32 row, nsITreeColumn *col) = 0;
  217.  
  218.   /**
  219.    * isEditable is called to ask the view if the cell contents are editable.
  220.    * A value of true will result in the tree popping up a text field when 
  221.    * the user tries to inline edit the cell.
  222.    */
  223.   /* boolean isEditable (in long row, in nsITreeColumn col); */
  224.   NS_IMETHOD IsEditable(PRInt32 row, nsITreeColumn *col, PRBool *_retval) = 0;
  225.  
  226.   /**
  227.    * setCellValue is called when the value of the cell has been set by the user.
  228.    * This method is only called for columns of type other than |text|.
  229.    */
  230.   /* void setCellValue (in long row, in nsITreeColumn col, in AString value); */
  231.   NS_IMETHOD SetCellValue(PRInt32 row, nsITreeColumn *col, const nsAString & value) = 0;
  232.  
  233.   /**
  234.    * setCellText is called when the contents of the cell have been edited by the user.
  235.    */
  236.   /* void setCellText (in long row, in nsITreeColumn col, in AString value); */
  237.   NS_IMETHOD SetCellText(PRInt32 row, nsITreeColumn *col, const nsAString & value) = 0;
  238.  
  239.   /**
  240.    * A command API that can be used to invoke commands on the selection.  The tree
  241.    * will automatically invoke this method when certain keys are pressed.  For example,
  242.    * when the DEL key is pressed, performAction will be called with the "delete" string.
  243.    */
  244.   /* void performAction (in wstring action); */
  245.   NS_IMETHOD PerformAction(const PRUnichar *action) = 0;
  246.  
  247.   /**
  248.    * A command API that can be used to invoke commands on a specific row.
  249.    */
  250.   /* void performActionOnRow (in wstring action, in long row); */
  251.   NS_IMETHOD PerformActionOnRow(const PRUnichar *action, PRInt32 row) = 0;
  252.  
  253.   /**
  254.    * A command API that can be used to invoke commands on a specific cell.
  255.    */
  256.   /* void performActionOnCell (in wstring action, in long row, in nsITreeColumn col); */
  257.   NS_IMETHOD PerformActionOnCell(const PRUnichar *action, PRInt32 row, nsITreeColumn *col) = 0;
  258.  
  259. };
  260.  
  261. /* Use this macro when declaring classes that implement this interface. */
  262. #define NS_DECL_NSITREEVIEW \
  263.   NS_IMETHOD GetRowCount(PRInt32 *aRowCount); \
  264.   NS_IMETHOD GetSelection(nsITreeSelection * *aSelection); \
  265.   NS_IMETHOD SetSelection(nsITreeSelection * aSelection); \
  266.   NS_IMETHOD GetRowProperties(PRInt32 index, nsISupportsArray *properties); \
  267.   NS_IMETHOD GetCellProperties(PRInt32 row, nsITreeColumn *col, nsISupportsArray *properties); \
  268.   NS_IMETHOD GetColumnProperties(nsITreeColumn *col, nsISupportsArray *properties); \
  269.   NS_IMETHOD IsContainer(PRInt32 index, PRBool *_retval); \
  270.   NS_IMETHOD IsContainerOpen(PRInt32 index, PRBool *_retval); \
  271.   NS_IMETHOD IsContainerEmpty(PRInt32 index, PRBool *_retval); \
  272.   NS_IMETHOD IsSeparator(PRInt32 index, PRBool *_retval); \
  273.   NS_IMETHOD IsSorted(PRBool *_retval); \
  274.   NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval); \
  275.   NS_IMETHOD Drop(PRInt32 row, PRInt32 orientation); \
  276.   NS_IMETHOD GetParentIndex(PRInt32 rowIndex, PRInt32 *_retval); \
  277.   NS_IMETHOD HasNextSibling(PRInt32 rowIndex, PRInt32 afterIndex, PRBool *_retval); \
  278.   NS_IMETHOD GetLevel(PRInt32 index, PRInt32 *_retval); \
  279.   NS_IMETHOD GetImageSrc(PRInt32 row, nsITreeColumn *col, nsAString & _retval); \
  280.   NS_IMETHOD GetProgressMode(PRInt32 row, nsITreeColumn *col, PRInt32 *_retval); \
  281.   NS_IMETHOD GetCellValue(PRInt32 row, nsITreeColumn *col, nsAString & _retval); \
  282.   NS_IMETHOD GetCellText(PRInt32 row, nsITreeColumn *col, nsAString & _retval); \
  283.   NS_IMETHOD SetTree(nsITreeBoxObject *tree); \
  284.   NS_IMETHOD ToggleOpenState(PRInt32 index); \
  285.   NS_IMETHOD CycleHeader(nsITreeColumn *col); \
  286.   NS_IMETHOD SelectionChanged(void); \
  287.   NS_IMETHOD CycleCell(PRInt32 row, nsITreeColumn *col); \
  288.   NS_IMETHOD IsEditable(PRInt32 row, nsITreeColumn *col, PRBool *_retval); \
  289.   NS_IMETHOD SetCellValue(PRInt32 row, nsITreeColumn *col, const nsAString & value); \
  290.   NS_IMETHOD SetCellText(PRInt32 row, nsITreeColumn *col, const nsAString & value); \
  291.   NS_IMETHOD PerformAction(const PRUnichar *action); \
  292.   NS_IMETHOD PerformActionOnRow(const PRUnichar *action, PRInt32 row); \
  293.   NS_IMETHOD PerformActionOnCell(const PRUnichar *action, PRInt32 row, nsITreeColumn *col); 
  294.  
  295. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  296. #define NS_FORWARD_NSITREEVIEW(_to) \
  297.   NS_IMETHOD GetRowCount(PRInt32 *aRowCount) { return _to GetRowCount(aRowCount); } \
  298.   NS_IMETHOD GetSelection(nsITreeSelection * *aSelection) { return _to GetSelection(aSelection); } \
  299.   NS_IMETHOD SetSelection(nsITreeSelection * aSelection) { return _to SetSelection(aSelection); } \
  300.   NS_IMETHOD GetRowProperties(PRInt32 index, nsISupportsArray *properties) { return _to GetRowProperties(index, properties); } \
  301.   NS_IMETHOD GetCellProperties(PRInt32 row, nsITreeColumn *col, nsISupportsArray *properties) { return _to GetCellProperties(row, col, properties); } \
  302.   NS_IMETHOD GetColumnProperties(nsITreeColumn *col, nsISupportsArray *properties) { return _to GetColumnProperties(col, properties); } \
  303.   NS_IMETHOD IsContainer(PRInt32 index, PRBool *_retval) { return _to IsContainer(index, _retval); } \
  304.   NS_IMETHOD IsContainerOpen(PRInt32 index, PRBool *_retval) { return _to IsContainerOpen(index, _retval); } \
  305.   NS_IMETHOD IsContainerEmpty(PRInt32 index, PRBool *_retval) { return _to IsContainerEmpty(index, _retval); } \
  306.   NS_IMETHOD IsSeparator(PRInt32 index, PRBool *_retval) { return _to IsSeparator(index, _retval); } \
  307.   NS_IMETHOD IsSorted(PRBool *_retval) { return _to IsSorted(_retval); } \
  308.   NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval) { return _to CanDrop(index, orientation, _retval); } \
  309.   NS_IMETHOD Drop(PRInt32 row, PRInt32 orientation) { return _to Drop(row, orientation); } \
  310.   NS_IMETHOD GetParentIndex(PRInt32 rowIndex, PRInt32 *_retval) { return _to GetParentIndex(rowIndex, _retval); } \
  311.   NS_IMETHOD HasNextSibling(PRInt32 rowIndex, PRInt32 afterIndex, PRBool *_retval) { return _to HasNextSibling(rowIndex, afterIndex, _retval); } \
  312.   NS_IMETHOD GetLevel(PRInt32 index, PRInt32 *_retval) { return _to GetLevel(index, _retval); } \
  313.   NS_IMETHOD GetImageSrc(PRInt32 row, nsITreeColumn *col, nsAString & _retval) { return _to GetImageSrc(row, col, _retval); } \
  314.   NS_IMETHOD GetProgressMode(PRInt32 row, nsITreeColumn *col, PRInt32 *_retval) { return _to GetProgressMode(row, col, _retval); } \
  315.   NS_IMETHOD GetCellValue(PRInt32 row, nsITreeColumn *col, nsAString & _retval) { return _to GetCellValue(row, col, _retval); } \
  316.   NS_IMETHOD GetCellText(PRInt32 row, nsITreeColumn *col, nsAString & _retval) { return _to GetCellText(row, col, _retval); } \
  317.   NS_IMETHOD SetTree(nsITreeBoxObject *tree) { return _to SetTree(tree); } \
  318.   NS_IMETHOD ToggleOpenState(PRInt32 index) { return _to ToggleOpenState(index); } \
  319.   NS_IMETHOD CycleHeader(nsITreeColumn *col) { return _to CycleHeader(col); } \
  320.   NS_IMETHOD SelectionChanged(void) { return _to SelectionChanged(); } \
  321.   NS_IMETHOD CycleCell(PRInt32 row, nsITreeColumn *col) { return _to CycleCell(row, col); } \
  322.   NS_IMETHOD IsEditable(PRInt32 row, nsITreeColumn *col, PRBool *_retval) { return _to IsEditable(row, col, _retval); } \
  323.   NS_IMETHOD SetCellValue(PRInt32 row, nsITreeColumn *col, const nsAString & value) { return _to SetCellValue(row, col, value); } \
  324.   NS_IMETHOD SetCellText(PRInt32 row, nsITreeColumn *col, const nsAString & value) { return _to SetCellText(row, col, value); } \
  325.   NS_IMETHOD PerformAction(const PRUnichar *action) { return _to PerformAction(action); } \
  326.   NS_IMETHOD PerformActionOnRow(const PRUnichar *action, PRInt32 row) { return _to PerformActionOnRow(action, row); } \
  327.   NS_IMETHOD PerformActionOnCell(const PRUnichar *action, PRInt32 row, nsITreeColumn *col) { return _to PerformActionOnCell(action, row, col); } 
  328.  
  329. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  330. #define NS_FORWARD_SAFE_NSITREEVIEW(_to) \
  331.   NS_IMETHOD GetRowCount(PRInt32 *aRowCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRowCount(aRowCount); } \
  332.   NS_IMETHOD GetSelection(nsITreeSelection * *aSelection) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelection(aSelection); } \
  333.   NS_IMETHOD SetSelection(nsITreeSelection * aSelection) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSelection(aSelection); } \
  334.   NS_IMETHOD GetRowProperties(PRInt32 index, nsISupportsArray *properties) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRowProperties(index, properties); } \
  335.   NS_IMETHOD GetCellProperties(PRInt32 row, nsITreeColumn *col, nsISupportsArray *properties) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCellProperties(row, col, properties); } \
  336.   NS_IMETHOD GetColumnProperties(nsITreeColumn *col, nsISupportsArray *properties) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetColumnProperties(col, properties); } \
  337.   NS_IMETHOD IsContainer(PRInt32 index, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsContainer(index, _retval); } \
  338.   NS_IMETHOD IsContainerOpen(PRInt32 index, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsContainerOpen(index, _retval); } \
  339.   NS_IMETHOD IsContainerEmpty(PRInt32 index, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsContainerEmpty(index, _retval); } \
  340.   NS_IMETHOD IsSeparator(PRInt32 index, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSeparator(index, _retval); } \
  341.   NS_IMETHOD IsSorted(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSorted(_retval); } \
  342.   NS_IMETHOD CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanDrop(index, orientation, _retval); } \
  343.   NS_IMETHOD Drop(PRInt32 row, PRInt32 orientation) { return !_to ? NS_ERROR_NULL_POINTER : _to->Drop(row, orientation); } \
  344.   NS_IMETHOD GetParentIndex(PRInt32 rowIndex, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParentIndex(rowIndex, _retval); } \
  345.   NS_IMETHOD HasNextSibling(PRInt32 rowIndex, PRInt32 afterIndex, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasNextSibling(rowIndex, afterIndex, _retval); } \
  346.   NS_IMETHOD GetLevel(PRInt32 index, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLevel(index, _retval); } \
  347.   NS_IMETHOD GetImageSrc(PRInt32 row, nsITreeColumn *col, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImageSrc(row, col, _retval); } \
  348.   NS_IMETHOD GetProgressMode(PRInt32 row, nsITreeColumn *col, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProgressMode(row, col, _retval); } \
  349.   NS_IMETHOD GetCellValue(PRInt32 row, nsITreeColumn *col, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCellValue(row, col, _retval); } \
  350.   NS_IMETHOD GetCellText(PRInt32 row, nsITreeColumn *col, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCellText(row, col, _retval); } \
  351.   NS_IMETHOD SetTree(nsITreeBoxObject *tree) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTree(tree); } \
  352.   NS_IMETHOD ToggleOpenState(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToggleOpenState(index); } \
  353.   NS_IMETHOD CycleHeader(nsITreeColumn *col) { return !_to ? NS_ERROR_NULL_POINTER : _to->CycleHeader(col); } \
  354.   NS_IMETHOD SelectionChanged(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectionChanged(); } \
  355.   NS_IMETHOD CycleCell(PRInt32 row, nsITreeColumn *col) { return !_to ? NS_ERROR_NULL_POINTER : _to->CycleCell(row, col); } \
  356.   NS_IMETHOD IsEditable(PRInt32 row, nsITreeColumn *col, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsEditable(row, col, _retval); } \
  357.   NS_IMETHOD SetCellValue(PRInt32 row, nsITreeColumn *col, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCellValue(row, col, value); } \
  358.   NS_IMETHOD SetCellText(PRInt32 row, nsITreeColumn *col, const nsAString & value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCellText(row, col, value); } \
  359.   NS_IMETHOD PerformAction(const PRUnichar *action) { return !_to ? NS_ERROR_NULL_POINTER : _to->PerformAction(action); } \
  360.   NS_IMETHOD PerformActionOnRow(const PRUnichar *action, PRInt32 row) { return !_to ? NS_ERROR_NULL_POINTER : _to->PerformActionOnRow(action, row); } \
  361.   NS_IMETHOD PerformActionOnCell(const PRUnichar *action, PRInt32 row, nsITreeColumn *col) { return !_to ? NS_ERROR_NULL_POINTER : _to->PerformActionOnCell(action, row, col); } 
  362.  
  363. #if 0
  364. /* Use the code below as a template for the implementation class for this interface. */
  365.  
  366. /* Header file */
  367. class nsTreeView : public nsITreeView
  368. {
  369. public:
  370.   NS_DECL_ISUPPORTS
  371.   NS_DECL_NSITREEVIEW
  372.  
  373.   nsTreeView();
  374.  
  375. private:
  376.   ~nsTreeView();
  377.  
  378. protected:
  379.   /* additional members */
  380. };
  381.  
  382. /* Implementation file */
  383. NS_IMPL_ISUPPORTS1(nsTreeView, nsITreeView)
  384.  
  385. nsTreeView::nsTreeView()
  386. {
  387.   /* member initializers and constructor code */
  388. }
  389.  
  390. nsTreeView::~nsTreeView()
  391. {
  392.   /* destructor code */
  393. }
  394.  
  395. /* readonly attribute long rowCount; */
  396. NS_IMETHODIMP nsTreeView::GetRowCount(PRInt32 *aRowCount)
  397. {
  398.     return NS_ERROR_NOT_IMPLEMENTED;
  399. }
  400.  
  401. /* attribute nsITreeSelection selection; */
  402. NS_IMETHODIMP nsTreeView::GetSelection(nsITreeSelection * *aSelection)
  403. {
  404.     return NS_ERROR_NOT_IMPLEMENTED;
  405. }
  406. NS_IMETHODIMP nsTreeView::SetSelection(nsITreeSelection * aSelection)
  407. {
  408.     return NS_ERROR_NOT_IMPLEMENTED;
  409. }
  410.  
  411. /* void getRowProperties (in long index, in nsISupportsArray properties); */
  412. NS_IMETHODIMP nsTreeView::GetRowProperties(PRInt32 index, nsISupportsArray *properties)
  413. {
  414.     return NS_ERROR_NOT_IMPLEMENTED;
  415. }
  416.  
  417. /* void getCellProperties (in long row, in nsITreeColumn col, in nsISupportsArray properties); */
  418. NS_IMETHODIMP nsTreeView::GetCellProperties(PRInt32 row, nsITreeColumn *col, nsISupportsArray *properties)
  419. {
  420.     return NS_ERROR_NOT_IMPLEMENTED;
  421. }
  422.  
  423. /* void getColumnProperties (in nsITreeColumn col, in nsISupportsArray properties); */
  424. NS_IMETHODIMP nsTreeView::GetColumnProperties(nsITreeColumn *col, nsISupportsArray *properties)
  425. {
  426.     return NS_ERROR_NOT_IMPLEMENTED;
  427. }
  428.  
  429. /* boolean isContainer (in long index); */
  430. NS_IMETHODIMP nsTreeView::IsContainer(PRInt32 index, PRBool *_retval)
  431. {
  432.     return NS_ERROR_NOT_IMPLEMENTED;
  433. }
  434.  
  435. /* boolean isContainerOpen (in long index); */
  436. NS_IMETHODIMP nsTreeView::IsContainerOpen(PRInt32 index, PRBool *_retval)
  437. {
  438.     return NS_ERROR_NOT_IMPLEMENTED;
  439. }
  440.  
  441. /* boolean isContainerEmpty (in long index); */
  442. NS_IMETHODIMP nsTreeView::IsContainerEmpty(PRInt32 index, PRBool *_retval)
  443. {
  444.     return NS_ERROR_NOT_IMPLEMENTED;
  445. }
  446.  
  447. /* boolean isSeparator (in long index); */
  448. NS_IMETHODIMP nsTreeView::IsSeparator(PRInt32 index, PRBool *_retval)
  449. {
  450.     return NS_ERROR_NOT_IMPLEMENTED;
  451. }
  452.  
  453. /* boolean isSorted (); */
  454. NS_IMETHODIMP nsTreeView::IsSorted(PRBool *_retval)
  455. {
  456.     return NS_ERROR_NOT_IMPLEMENTED;
  457. }
  458.  
  459. /* boolean canDrop (in long index, in long orientation); */
  460. NS_IMETHODIMP nsTreeView::CanDrop(PRInt32 index, PRInt32 orientation, PRBool *_retval)
  461. {
  462.     return NS_ERROR_NOT_IMPLEMENTED;
  463. }
  464.  
  465. /* void drop (in long row, in long orientation); */
  466. NS_IMETHODIMP nsTreeView::Drop(PRInt32 row, PRInt32 orientation)
  467. {
  468.     return NS_ERROR_NOT_IMPLEMENTED;
  469. }
  470.  
  471. /* long getParentIndex (in long rowIndex); */
  472. NS_IMETHODIMP nsTreeView::GetParentIndex(PRInt32 rowIndex, PRInt32 *_retval)
  473. {
  474.     return NS_ERROR_NOT_IMPLEMENTED;
  475. }
  476.  
  477. /* boolean hasNextSibling (in long rowIndex, in long afterIndex); */
  478. NS_IMETHODIMP nsTreeView::HasNextSibling(PRInt32 rowIndex, PRInt32 afterIndex, PRBool *_retval)
  479. {
  480.     return NS_ERROR_NOT_IMPLEMENTED;
  481. }
  482.  
  483. /* long getLevel (in long index); */
  484. NS_IMETHODIMP nsTreeView::GetLevel(PRInt32 index, PRInt32 *_retval)
  485. {
  486.     return NS_ERROR_NOT_IMPLEMENTED;
  487. }
  488.  
  489. /* AString getImageSrc (in long row, in nsITreeColumn col); */
  490. NS_IMETHODIMP nsTreeView::GetImageSrc(PRInt32 row, nsITreeColumn *col, nsAString & _retval)
  491. {
  492.     return NS_ERROR_NOT_IMPLEMENTED;
  493. }
  494.  
  495. /* long getProgressMode (in long row, in nsITreeColumn col); */
  496. NS_IMETHODIMP nsTreeView::GetProgressMode(PRInt32 row, nsITreeColumn *col, PRInt32 *_retval)
  497. {
  498.     return NS_ERROR_NOT_IMPLEMENTED;
  499. }
  500.  
  501. /* AString getCellValue (in long row, in nsITreeColumn col); */
  502. NS_IMETHODIMP nsTreeView::GetCellValue(PRInt32 row, nsITreeColumn *col, nsAString & _retval)
  503. {
  504.     return NS_ERROR_NOT_IMPLEMENTED;
  505. }
  506.  
  507. /* AString getCellText (in long row, in nsITreeColumn col); */
  508. NS_IMETHODIMP nsTreeView::GetCellText(PRInt32 row, nsITreeColumn *col, nsAString & _retval)
  509. {
  510.     return NS_ERROR_NOT_IMPLEMENTED;
  511. }
  512.  
  513. /* void setTree (in nsITreeBoxObject tree); */
  514. NS_IMETHODIMP nsTreeView::SetTree(nsITreeBoxObject *tree)
  515. {
  516.     return NS_ERROR_NOT_IMPLEMENTED;
  517. }
  518.  
  519. /* void toggleOpenState (in long index); */
  520. NS_IMETHODIMP nsTreeView::ToggleOpenState(PRInt32 index)
  521. {
  522.     return NS_ERROR_NOT_IMPLEMENTED;
  523. }
  524.  
  525. /* void cycleHeader (in nsITreeColumn col); */
  526. NS_IMETHODIMP nsTreeView::CycleHeader(nsITreeColumn *col)
  527. {
  528.     return NS_ERROR_NOT_IMPLEMENTED;
  529. }
  530.  
  531. /* void selectionChanged (); */
  532. NS_IMETHODIMP nsTreeView::SelectionChanged()
  533. {
  534.     return NS_ERROR_NOT_IMPLEMENTED;
  535. }
  536.  
  537. /* void cycleCell (in long row, in nsITreeColumn col); */
  538. NS_IMETHODIMP nsTreeView::CycleCell(PRInt32 row, nsITreeColumn *col)
  539. {
  540.     return NS_ERROR_NOT_IMPLEMENTED;
  541. }
  542.  
  543. /* boolean isEditable (in long row, in nsITreeColumn col); */
  544. NS_IMETHODIMP nsTreeView::IsEditable(PRInt32 row, nsITreeColumn *col, PRBool *_retval)
  545. {
  546.     return NS_ERROR_NOT_IMPLEMENTED;
  547. }
  548.  
  549. /* void setCellValue (in long row, in nsITreeColumn col, in AString value); */
  550. NS_IMETHODIMP nsTreeView::SetCellValue(PRInt32 row, nsITreeColumn *col, const nsAString & value)
  551. {
  552.     return NS_ERROR_NOT_IMPLEMENTED;
  553. }
  554.  
  555. /* void setCellText (in long row, in nsITreeColumn col, in AString value); */
  556. NS_IMETHODIMP nsTreeView::SetCellText(PRInt32 row, nsITreeColumn *col, const nsAString & value)
  557. {
  558.     return NS_ERROR_NOT_IMPLEMENTED;
  559. }
  560.  
  561. /* void performAction (in wstring action); */
  562. NS_IMETHODIMP nsTreeView::PerformAction(const PRUnichar *action)
  563. {
  564.     return NS_ERROR_NOT_IMPLEMENTED;
  565. }
  566.  
  567. /* void performActionOnRow (in wstring action, in long row); */
  568. NS_IMETHODIMP nsTreeView::PerformActionOnRow(const PRUnichar *action, PRInt32 row)
  569. {
  570.     return NS_ERROR_NOT_IMPLEMENTED;
  571. }
  572.  
  573. /* void performActionOnCell (in wstring action, in long row, in nsITreeColumn col); */
  574. NS_IMETHODIMP nsTreeView::PerformActionOnCell(const PRUnichar *action, PRInt32 row, nsITreeColumn *col)
  575. {
  576.     return NS_ERROR_NOT_IMPLEMENTED;
  577. }
  578.  
  579. /* End of implementation class template. */
  580. #endif
  581.  
  582.  
  583. #endif /* __gen_nsITreeView_h__ */
  584.